import java.util.concurrent.Callable;

public class CompanySalary {
    public static void main(String[] args) {
        Empoyee[] empoyees = new Empoyee[29];
        for(int i = 0; i < empoyees.length; i++)
        {
            if(i % 3 == 0)
                empoyees[i] = new WeekWorker();
            else if(i % 3 == 1)
                empoyees[i] = new MonthWorker();
            else if(i % 3 == 2)
                empoyees[i] = new YearWorker();
        }
        Company company = new Company(empoyees);
        System.out.println("公司薪水总额:"+ company.salarisePay()+"元");
    }
}
